import request from '@/utils/request'

// 查询出库列表
export function listOutboundOrder(query) {
  
  query.pageSize=10;
  if(!query.pageNum){
    query.pageNum=1;
  }
  return request({
    url: 'material/outboundOrder/list',
    method: 'get',
    params: query
  })
}

export function WarehouseInfo(query) {
  return request({
    url: '/material/WarehouseInfo/list?pageNum=1&pageSize=10',
    method: 'get',
    params: query
  })
}


// 查询出库详细
export function getOutboundOrder(id) {
  return request({
    url: '/material/outboundOrder/' + id,
    method: 'get'
  })
}

// 新增出库
export function addOutboundOrder(data) {
  console.log("dtrftv");
  return request({
    url: '/material/outboundOrder',
    method: 'post',
    data: data
  })
}

// 修改出库
export function updateOutboundOrder(data) {
  return request({
    url: '/material/outboundOrder/',
    method: 'put',
    data: data
  })
}

// 删除出库
export function delOutboundOrder(id) {
  return request({
    url: '/material/outboundOrder/' + id,
    method: 'delete'
  })
}

//确认出库
export function confirmOutOfStock(id){
  return request({
    url: 'material/outboundOrder/status/' + id,
    method: 'get'
  })
}


// 查询信息
export function Querying(id){
  return request({
    url: '/material/outboundOrder/' + id,
    method: 'get',
  })
}


export function wuliao(){
  return request({
    url: '/material/WarehouseInfo/list',
    method: 'get',
  })
}


// 物料类别
export function wuliaoList(data){
  return request({
    url: '/material/material/list',
    method: 'get',
  })
}
// 关联项目
export function guanlianPro(data){
  return request({
    url: '/Project/ProjectInfo/list',
    method: 'get',
  })
}